package edu.unr.cater.npap.server.locator;

import com.google.web.bindery.requestfactory.shared.Locator;
import edu.unr.cater.npap.client.domain.PlatformUser;
import org.springframework.roo.addon.gwt.RooGwtLocator;
import org.springframework.stereotype.Component;

@RooGwtLocator("edu.unr.cater.npap.client.domain.PlatformUser")
@Component
public class PlatformUserLocator extends Locator<PlatformUser, Integer> {

    public PlatformUser create(Class<? extends edu.unr.cater.npap.client.domain.PlatformUser> clazz) {
        return new PlatformUser();
    }

    public PlatformUser find(Class<? extends edu.unr.cater.npap.client.domain.PlatformUser> clazz, Integer id) {
        return PlatformUser.findPlatformUser(id);
    }

    public Class<edu.unr.cater.npap.client.domain.PlatformUser> getDomainType() {
        return PlatformUser.class;
    }

    public Integer getId(PlatformUser platformUser) {
        return platformUser.getPlatformUserId();
    }

    public Class<java.lang.Integer> getIdType() {
        return Integer.class;
    }

    public Object getVersion(PlatformUser platformUser) {
        return platformUser.getVersion();
    }
}
